package com.david.avcodec

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.david.avcodec.system.MyAudioMediaRecorderActivity
import com.david.avcodec.system.MyVideoMediaRecorderActivity
import com.david.avcodec.system.SystemAudioActivity
import com.david.avcodec.system.SystemVideoActivity

//参考链接：https://blog.csdn.net/yu540135101/article/details/105589424#
//https://blog.csdn.net/android_technology/article/details/69388902


//TODO 使用系统录制及播放音频：https://blog.csdn.net/yu540135101/article/details/103655058
//TODO 使用系统录制及播放视频：https://developer.android.google.cn/training/camera/videobasics?hl=zh-cn
//TODO 使用audioRecoder录制音频并使用audioTrack播放
//TODO 使用mediaRecoder录制视频并使用mediaPlayer播放

//TODO 使用mediaCodec硬编码音频视频并保存文件 https://www.jianshu.com/p/fbead532803b https://blog.csdn.net/wuqingsen1/article/details/106549948  https://blog.csdn.net/qq_34760508/article/details/107045337
//TODO 使用mediaCodec硬解码音频视频并播放 https://blog.csdn.net/yu540135101/article/details/106611303  https://blog.csdn.net/gs12software/article/details/106349092
//TODO 使用ffmpeg软编码音频视频并保存
//TODO 使用ffmpeg软解码音频视频并播放
//https://www.jianshu.com/p/f5a1c9318524

//录屏传送：https://blog.csdn.net/qq_33023933/article/details/107282156
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        findViewById<View>(R.id.main_btn).setOnClickListener {
//            startActivity(Intent(this@MainActivity, SystemVideoActivity::class.java))
//            startActivity(Intent(this@MainActivity, SystemAudioActivity::class.java))
//            startActivity(Intent(this@MainActivity, MyAudioMediaRecorderActivity::class.java))
//            startActivity(Intent(this@MainActivity, MyVideoMediaRecorderActivity::class.java))
            startActivity(Intent(this@MainActivity, CameraXTestActivity::class.java))
        }
    }
}